<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<script type="text/javascript" src="${pageContext.request.contextPath}/jQuery/jquery-3.6.0.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap460/css/bootstrap.css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap460/css/bootstrap.min.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/bootstrap460/js/bootstrap.js"></script>
<link href="http://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css" rel="stylesheet" />
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js" ></script>
<div style="padding: 20px" class="container">

    <table class="table mt-3 mb-3" id="mtable">
        <h5 class="text-center">全体学生信息</h5>
        <div class="mt-3 mb-3">
            <a class="btn btn-success" href="${pageContext.request.contextPath}/student/normal/addStuView">添加</a>
        </div>
        <thead>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>入学日期</th>
            <th>出生日期</th>
            <th>学院</th>
            <th>专业</th>
            <th>政治面貌</th>
            <th>家庭住址</th>
            <th>联系方式</th>
            <th>密码</th>
            <th>所住寝室</th>
            <th style="display: none">所在宿舍楼号</th>
            <th>所在宿舍楼</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${stus}" var="s">
            <tr>
                <td>${s.stu_Key}</td>
                <td>${s.stu_Name}</td>
                <td>${s.stu_Sex}</td>
                <td>${s.stu_Enr}</td>
                <td>${s.stu_Birth}</td>
                <td>${s.stu_College}</td>
                <td>${s.stu_Major}</td>
                <td>${s.stu_Polit}</td>
                <td>${s.stu_Address}</td>
                <td>${s.stu_Tel}</td>
                <td>******</td>
                <td>${s.dor_id}</td>
                <td style="display: none">${s.build_id}</td>
                <td>${s.build_name}</td>
                <td>
                    <a class="btn btn-primary" href="${pageContext.request.contextPath}/student/normal/updateStuView?Stu_Key=${s.stu_Key}&Stu_Name=${s.stu_Name}&Stu_Sex=${s.stu_Sex}&Stu_Enr=${s.stu_Enr}&Stu_Birth=${s.stu_Birth}&Stu_College=${s.stu_College}&Stu_Major=${s.stu_Major}&Stu_Polit=${s.stu_Polit}&Stu_Address=${s.stu_Address}&Stu_Tel=${s.stu_Tel}&password=${s.password}&build_id=${s.build_id}&dor_id=${s.dor_id}&build_name=${s.build_name}"><i class="fa fa-pencil" aria-hidden="true"/>修改</a>
                    <a class="btn btn-danger" href="${pageContext.request.contextPath}/student/normal/deleteStuView?Stu_Key=${s.stu_Key}&Stu_Name=${s.stu_Name}"><i class="fa fa-trash" aria-hidden="true"/> 删除</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/hui/lib/datatables/1.10.15/jquery.dataTables.js">
<script type="text/javascript" charset="utf8" src="${pageContext.request.contextPath}/hui/lib/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script>
    $(function(){
        $("#mtable").DataTable();
    })
</script>
</body>
</html>
